﻿@using OSBLE.Resources
@using OSBLE.Models.Assignments
@model DynamicDictionary
@{
    dynamic dataModel = Model;
    int assignmentId = dataModel.PublishCR.assignmentID;
    string linkDisplayValue = dataModel.PublishCR.PublishButtonDisplayValue;
}

<tr>
    <th>Critical Review</br>Publish Status</th>
    <td>
        @if (dataModel.PublishCR.PublishStatus == "Published")
        {
            <text>Published </text>
            <time 
                class="utc-time"
                datetime="@Helpers.DateAsUnixTime(dataModel.PublishDate)" 
                data-original-date="@Helpers.RawDate(dataModel.PublishDate)" 
                data-date-format="MM/DD/YYYY hh:mm A">@dataModel.PublishDate.ToShortDateString() @dataModel.PublishDate.ToShortTimeString()</time>
        }
        else
        {
            <text>Not Published </text>
        }
        @Html.ActionLink(linkDisplayValue,
                    "PublishAllCriticalReviews",
                    "Assignment",
                    new { area = "", assignmentID = assignmentId },
                    new { })
    </td>
</tr>

